#pragma once

#include "Render/Shader.h"
#include "Scene/CubeMesh.h"

class BlockOutline {
public:
  explicit BlockOutline(Ref<CubeMesh> blockMesh);

  void SetBlockModel(const Ref<BlockModel>& model) {
    m_blockMesh = CreateRef<CubeMesh>(model);
  }
  const Ref<BlockModel>& GetBlockModel() const { return m_blockMesh->GetBlockModel(); }
  void SetOutlineColor(const glm::vec4& color) { m_outlineColor = color; }
  void Render(const glm::mat4& mvp) const;

private:
  Ref<Shader> m_outlinedBlockShader;
  Ref<CubeMesh> m_blockMesh;

  glm::vec4 m_outlineColor = glm::vec4(1.0f);
};